package cate.common.table.activity.custommade;

import cate.common.table.ESheet;

import java.util.List;
import java.util.stream.Collectors;

public class CustomMadePosSheet extends ESheet<CustomMadePosRow> {
    @Override
    public String getSheetName() {
        return "栏位配置";
    }

    public List<CustomMadePosRow> getPosRows(int posGroup) {
        return getList().stream().filter(e -> e.posGroup == posGroup).collect(Collectors.toList());
    }

    public CustomMadePosRow getPosRow(int posGroup, byte pos) {
        return getList().stream().filter(e -> e.posGroup == posGroup && e.pos == pos).findAny().orElse(null);
    }
}
